package com.deryun.tyl.dao.impl;

import java.util.List;

import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.beans.factory.annotation.Autowired;

import com.deryun.tyl.bean.Purchasing;
import com.deryun.tyl.bean.Purchasing;
import com.deryun.tyl.bean.mapper.PurchasingMapper;

public class PurchasingDaoImpl extends SqlSessionDaoSupport {
	
	@Autowired
	private PurchasingMapper purchasingMapper;
	
	public int addPurchasing(Purchasing purchasing){
		return purchasingMapper.addPurchasing(purchasing);
	}
	
	public List<Purchasing> getAllPurchasing(){
		return purchasingMapper.getAllPurchasing();
	}
	
	public List<Purchasing> getUserPurchasing(String publishUserId){
		return purchasingMapper.getUserPurchasing(publishUserId);
	}
	
	public int deletePurchasing(int id){
		return purchasingMapper.deletePurchasing(id);
	}
	
	public int modifyPurchasing(Purchasing purchasing){
		return purchasingMapper.modifyPurchasing(purchasing);
	}
	
	public Purchasing getPurchasingById(int id){
		return purchasingMapper.getPurchasingById(id);
	}
	
	public int setResult(Purchasing purchasing){
		return purchasingMapper.setResult(purchasing);
	}
}
